<template>
    <div class="box4">
        <!-- <router-link to="/classmanager/classdetails/studentdetails" class="navs">学生详情</router-link> -->
        <h2>学生详情</h2>
        <h2 class="exit" @click="exit">返回</h2>
        <div class="wrap">
            <el-row class="row_1">
              <el-col class="col_1" :span="12">
                <h3>姓&nbsp;&nbsp;&nbsp;名&nbsp;:</h3>
                <p>{{tableinfo.stuName}}</p>
              </el-col>
              <el-col class="col_1" :span="12">
                <h3>年&nbsp;&nbsp;&nbsp;龄&nbsp;:</h3>
                <p>{{tableinfo.stuAge}}</p>
              </el-col>
            </el-row>
            <el-row class="row_1">
              <el-col class="col_1" :span="12">
                <h3>性&nbsp;&nbsp;&nbsp;别&nbsp;:</h3>
                <p>{{tableinfo.stuSex}}</p>
              </el-col>
              <el-col class="col_1" :span="12">
                <h3>班&nbsp;&nbsp;&nbsp;级&nbsp;:</h3>
                <p>{{tableinfo.className}}</p>
              </el-col>
            </el-row>
            <el-row class="row_1">
              <el-col class="col_1" :span="12">
                <h3>学&nbsp;&nbsp;&nbsp;号&nbsp;:</h3>
                <p>{{tableinfo.stuNum}}</p>
              </el-col>
              <el-col class="col_1" :span="12">
                <h3>入学时间:</h3>
                <p>{{tableinfo.stuTime}}</p>
              </el-col>
            </el-row>
            <el-row class="row_1">
              <el-col class="col_1" :span="12">
                <h3>籍&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;贯&nbsp;&nbsp;:</h3>
                <p>{{tableinfo.stuAddress}}</p>
              </el-col>
              <el-col class="col_1" :span="12">
                <h3>民&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;族&nbsp;&nbsp;:</h3>
                <p>{{tableinfo.stuNation}}</p>
              </el-col>
            </el-row>
            <el-row class="row_1">
              <el-col class="col_1" :span="12">
                <h3>联系方式:</h3>
                <p>{{tableinfo.stuPhone}}</p>
              </el-col>
              <el-col class="col_1" :span="12">
                <h3>监护人:</h3>
                <p>{{tableinfo.stuPerson}}</p>
              </el-col>
            </el-row>
            <el-row class="row_1">
              <el-col class="col_1" :span="12">
                <h3>兴趣爱好:</h3>
                <p>{{tableinfo.stuHabby}}</p>
              </el-col>
            </el-row>
        </div>
    </div>
</template>

<script>
export default {
  data(){
    return{
        baseUrl:require("../js/baseUrl.js").baseUrl,
        tableinfo:{}
    }
  },
  methods:{
    //学生详情:SchoolSys/stu/selectid
    getStudent(){
      this.$http.post(this.baseUrl+'student/stuInfo',{
        stuId:this.$route.query.stuId
      }).then(res=>{
        // console.log(res.data.data[0]);
        if(res.data.code==200){
          this.tableinfo=res.data.data[0]
        }
                  
      })
    },
    exit(){
      this.$router.push('/class/classStu?classId='+this.$route.query.classId+'&className='+this.$route.query.className)
    }
  },
  mounted(){
    this.getStudent()
  }
}
</script>

<style lang="less">
.box4{
  position: relative;

  .wrap{
		margin-right: 20px;
		margin-top: 40px;
	}
	.wrap h3{
		width: 90px;
		height: 30px;
		line-height: 10px;
	}
  .wrap p{
		width: 320px;
		margin-left: 10px;
		margin-bottom: 19px;
		line-height: 40px;
		border: 1px solid #999;
		background-color: #ffffff;
		padding-left: 10px;
	}
	.wrap .row_1 .col_1{
		display: flex;
		align-items: center;
	}
  .exit{
    position: absolute;
    top: 0;
    right: 0;
    cursor: pointer;
  }
  }
</style>